When server is Linux, client is Windows, using Python.
In the python file:
add the following code1
2import pydevd
pydevd.settrace('202.120.38.30', port=5678)
in which the IP address is the Windows IP and the port is the default Eclipse debugger port.
Under Linux:
pip install pydevd
- In the file
lib/python2.7/site-packages/pydevd_file_utils.py
, modifyPATHS_FROM_ECLIPSE_TO_PYTHON = [(r'L:\test', r'/home/niuli/test')]
, in which the former is Windows path and the latter is Linux path.
Under Windows:
- Install Eclipse IDE and PyDev plugin for Eclipse.
- Pydev->Start Debug Server
- Open the Debug perspective and watch Debug Server.
After the above preparation, run python code under Linux and the debugging process will jump to the debug server under Windows. For interactive debugging, open PyDev Debug Console.